You are not logged in.
Hey-hey,
i would like to arrange automatic backups on start up every three weeks of my ~/Documents folder to the sd card plugged into my netbook.
Appreciate instructions
Many thanks in advance
"Be humble, be cool, dance techno-style to heavy metal music."
Offline
Search the forum for rsync - I think some users have already shared some scripts that do that.
You'll just have to make some modifications to match up with your system.
Last edited by PackRat (2018-03-12 23:11:07)
You must unlearn what you have learned.
-- yoda
Offline
Right, a practical example, script like
#!/bin/bash
# backup
rsync -av --stats --progress --exclude 'z800*' --exclude 'Adobe Premiere*' --exclude '*.cfa' --exclude '*.pek' --exclude '*.qtindex' --exclude '*.hphys' --exclude '*.DS_store' /Volumes/int_raid/brontosaurusrex_small /Volumes/backup/
Started from cron
# crontab to rsync my working dir with another disk, everyday at midnight
00 00 * * * /home/b/bin/backup >/tmp/stdout.log 2>/tmp/stderr.log
^ That was actually running on my work osx for a long time, /tmp/stderr.log will be the place to check when/if things go wrong. p.s. Also keep in my mind that rsync is actually unidirectional (glorified cp basically).
Last edited by brontosaurusrex (2018-03-13 09:33:21)
Offline
^ You can put all those exclude patterns into a single file and then use "--exclude-from" to read in the file:
rsync -av --exclude-from='/home/user/exclude.txt'
Makes it easier to add/remove excludes - just edit the exclude.txt.
from the rsync man page:
--exclude-from=FILE
This option is related to the --exclude option, but it specifies
a FILE that contains exclude patterns (one per line). Blank
lines in the file and lines starting with ’;’ or ’#’ are
ignored. If FILE is -, the list will be read from standard
input.
You must unlearn what you have learned.
-- yoda
Offline
This is the script that I use. It works with a systemd timer. It also uses a backup-excludes file.
Offline
I would never trust something as important as a backup to automation.
Offline
afaiu, rsync does not do deduplication.
this is why i chose borg eventually.
Offline
rsync does not do deduplication
Perhaps I am misunderstanding what you mean by "deduplication" but rsync only copies over the differences between the last backup and the current system.
There is also tarsnap, it's a paid service but quite good value:
Offline
Perhaps I am misunderstanding what you mean by "deduplication" but rsync only copies over the differences between the last backup and the current system.
my bad; that would be the definition of deduplication. [ that
wikipedia article mentions data compression as a defining aspect of deduplication, but i believe that to be wrong. of course it could be argued that deduplication is a form of compression. ]
Offline
I read about recommendations regarding rsnapshot, but cannot comment on it as never tested it.
Offline