Backup-data: multiple schedule and backends

(Héctor Pérez) #81

Hi there pagaille, is posible to ask You the command to configure a USB external disk for a backup, at the end of the year I have the disks to probe this new feature, but I have all the weekend trying to configure the drive for backup and is not posible.

Thanks in advance.

(Giacomo Sanchietti) #82

You can follow the instructions inside the manual:

Otherwise, Cockpit already has a web interface which does the job. To install it:

yum --enablerepo=nethserver-testing install nethserver-cockpit

Then connect to: http://your_server:9090

(Matthieu Gaillet) #83

Hey @hector

I’m afraid the whole discussion here has been superseded by the new nethserver-backup package that addressed the issues I wrote here and much more.

As @giacomo mentioned it, the manual is quite extensive regarding the way you should configure external usb drive. I referred to it too.

More details would be useful to help you more extensively.

(Héctor Pérez) #84

Hey giacomo, the cockpit was the answer for my problem Amazing job, nethserver 8 will be the top server to administrate, thanks , now is to check an error to edit the backup configuration.

@pagaille, thanks for the answer but the cockpit didit for me.

I need to rotate the hardrives every week (one drive is connected the other is in a bank locker), also i need to backup only 2 two days not 30d with rsync, I have to do it manualy but is not clear how to do it.

The failure on editing the backup config.

JavaScript Console in the browser.

Uncaught TypeError: b.props.NotifyTo.join is not a function
at VueComponent.initWizard (webpack:///./src/router/index.js_+66_modules?:2813)
at VueComponent.openEditBackupData (webpack:///./src/router/index.js
at click (webpack:///./src/router/index.js
at invoker (webpack:///./node_modules/vue/dist/vue.esm.js?:2024)
at HTMLAnchorElement.fn._withTask.fn._withTask (webpack:///./node_modules/vue/dist/vue.esm.js?:1823)

(Giacomo Sanchietti) #85

Than you for reporting, I know @edoardo_spadoni is already working on it :wink:

(Héctor Pérez) #86

Does anybody know the how to switch from 30 days of backup to only 2 days?.

Do I have to edit a file or is a command line db update.

The cockpit works amazing but doesn’t have that function.

Thank’s in advance.

(Matthieu Gaillet) #87

From the doc here

Retention policy

Each engine can implement its own retention policy. The policy can be set using the CleanupOlderThan property.

The property takes a number followed by D, M or Y (Days, Months, or Years respectively).

Example: cleanup after 30 days:

db backups setprop mybackup CleanupOlderThan 30D

The retention policy is not supported by the rsync backend.

(Héctor Pérez) #88

Thanks a lot, I was seaching inside the doc but could´nt find any thing.

I miss the magic words: RETENTION POLICY

The retention policy is not supported by the rsync backend.

Now is to search the script and edit the folder.

(Héctor Pérez) #89

EJEJEJEJE, that was easy guys just edit : /usr/bin/rsync_tmbackup just search for KEEP_DAILIES_DATE=$((EPOCH - 172800)) # 2 days ago.

And set 2 days ago, now is to see the rsync next 2 days to know the behavior.

Amazing job!!!

(Matthieu Gaillet) #90

Out of curiosity, why would you want to put a retention policy ? The rsync script is made to mimic Time Machine (Mac) behavior which fills the hard drive until free space is exhausted. From then it purges the oldest backups to make room for the next one.

That way your backup disk space is used as efficiently as possible.

I think you may have missed a point here; moreover you’re taking risks by modifying the script since it will be probably overwritten by future updates.

(Giacomo Sanchietti) #91

The retention policy for rsync has various bugs and doesn’t work as expected.
This is why the retention is not supported right now.

You can check the upstream repo and see if any fixes landed in the latest source tree.

(Héctor Pérez) #92

:disappointed_relieved: I probed today It’ is not working. Going to check how to hack it!!!