[CS-FSLUG] Backing up in Linux
l4c
l4c at thelinuxlink.net
Mon May 19 07:00:53 CDT 2008
Eduardo Sanchez wrote:
> This looks like a job for cron and tar, and perhaps rsync. I don't
> recall the details, but you can check these links:
>
> http://www.techworld.com/features/index.cfm?featureID=391&printerfriendly=1
> http://www.gnu.org/software/tar/manual/html_node/Incremental-Dumps.html
> http://mikerubel.org/computers/rsync_snapshots/
> http://www.faqs.org/docs/linux_admin/x2540.html
> http://www.faqs.org/docs/securing/chap29sec306.html
>
> You can also look at Arnie:
> http://furius.ca/arnie/
>
> Putting some tar job in a crontab to enable a periodical repetition
> should be trivial, especially with a GUI utility such as kcron.
>
> Blessings,
>
>
> Eduardo
>
>
Yes, I am inclined to agree with Ed on this one. This is what I do:
Create a cron entry to tar up everything once a week "tar czvpf
myfilename.tgz /" or whathaveyou. Then all other days in the week do an
incremental backup using find and tar like this "find / -type f -mtime
-1 | tar czvpf myfilename.tgz -T -".
It's all pretty easy. The first tar command will create a gzipped tar
file containing everything under root "/" (1), and the second will scour
for any file that has changed in the last 24 hours and back that up.
Obviously change the filenames, etc.. I usually create filenames by
dates like so:
"find / -type f -mtime -1 | tar czvpf inc_`date +%Y%m%d`.tgz -T -"
Which would create a file today called inc_20080519.tgz. Adjust your
preferences accordingly. Some people just set things up to call the
file the name of the day of the week, that way you keep a weeks worth of
backups and they just overwrite themselves.
(1) Note that I normally do not advise people to back their entire
system up. After trying this several times I have come to the
conclusion that it is simply not worth the effort to do bare metal Linux
restores from backup. It's much easter (and faster) to restore a base
distro from cd and then restore your data from backup. Hence, I
normally only backup my home directory(ies) and /etc and any other data
directories I might use.
More information about the Christiansource
mailing list