[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Backup script




>
> # cd /mount_point_linux_root_directory
> # tar czf /path_for_backups/backup_name.tar.gz *
>



Backup up your running machine using tar is fine but you should probably exclude some directories.

Something like this would do (you may want to remove some of the excludes like logs for example).

cd /
tar -czf /backups/linux1.tar.gz ./ --exclude="backups" --exclude="tmp" --exclude="var/tmp" --exclude="var/log" --exclude="var/cache" --exclude="proc" --exclude="mnt" --exclude="media" --exclude="sys"

Tar's --one-file-system argument could also prove useful in your situation.  Check the man page.

You could then write a simple for loop to backup all your mounted Linux installs.



Reply to: