Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question : keep older backups than sanoid snapshots #987

Closed
loxK opened this issue Feb 16, 2025 · 1 comment
Closed

Question : keep older backups than sanoid snapshots #987

loxK opened this issue Feb 16, 2025 · 1 comment

Comments

@loxK
Copy link

loxK commented Feb 16, 2025

Hello,

Sorry it is more a question than an issue ...

I have this config :

[vm]
    use_template = ssd
    recursive = yes
    process_children_only = no

[backup/BACKUP]
    use_template = backup
    recursive = yes

[template_ssd]
    frequently = 12
    hourly = 24
    daily = 4
    monthly = 0
    yearly = 0
    autosnap = yes
    autoprune = yes
    capacity_warn = 80
    capacity_crit = 95

[template_backup]
    frequently = 12
    hourly = 24
    daily = 30
    monthly = 6
    yearly = 0
    autosnap = no
    autoprune = yes
    hourly_warn = 2880
    hourly_crit = 3600
    daily_warn = 48
    daily_crit = 60

I backup this way :

/usr/sbin/syncoid --recursive --no-sync-snap --preserve-recordsize vm backup/BACKUP/vm

After a while syncoid fails complaining that snapshots of the origin datasets are missing. What is the proper syncoid command to keep older snapshots than what is available in origin dataset ?

@jimsalterjrs
Copy link
Owner

After a while syncoid fails complaining that snapshots of the origin datasets are missing. What is the proper syncoid command to keep older snapshots than what is available in origin dataset ?

Stop using --no-sync-snap, that's literally what it's for. To give you a snapshot to base incrementals on which won't be removed.

If you want to use --no-sync-snap, then it's on you to make sure that you are keeping an eye on things and making sure you replicate frequently enough that your newest snapshot on the target doesn't become older than the oldest snapshot on your source.

And since your custom "ssd" template takes no monthly snapshots, your monthly=6 on the target has no effect. Can't preserve six monthlies if you never get any monthlies in the first place. Set monthly=1 on your source, if you want the target to be able to build up a cache of monthlies.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants