rsync, reliable "copy and paste" type of backup in case things break?
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
and this creates a folder for me with all my files, and apparently saves meta data like permissions and paths...
Since I'm using arch and things break sometimes,I'm booted into a CLI with errors and cannot figure my way out since I'm a noob... would I be able to just delete my entire root and replace it with the rsync backup without a problem?
Your backup method seems a bit odd.. Do you still have the images you made of your Linux installation, or was it an image of your whole device?
For backups, I usually recommend writing a BASH script which can be automated by the cron service. In plain English that means: write a BASH script which locates and copies your /home directory and edited configuration files (not all of /etc, just .conf files I may have changed) to a "Backup" folder. Compress with tar, saving permissions with the "-p" flag at least. It must be created with root and extracted by root, as a user cannot change permissions above him/herself.
The script should then remove the files copied and store, move or upload your compressed backup to wherever you want. Using BASH and various ftp software, you can automate a secure uploaded backup to a remote server, and have it check for old versions older than 1 week, 2 weeks, etc for deletion. Other options are to have the script check to see if your backup drive is plugged in around 12am-4am every 30-45 minutes using hardware ID or mountpoint (latter works but is sloppy) and mirror/move backups to drive.
For a seamless recovery, a script can be included in your backup to backup config files, move in ones from backup and copy over /home directory. It could then run "adduser" to recreate your account and subsequently change permissions/ownership of user directories back to "you".
You seem to have tried to exclude an awful lot, why?
Gfl (ghost for linux) will create an image that you can overwrite a drive with, probably a partition, I've never used it.
Rsync does incremental backups. On restore it (as I understand it) puts back what is missing but will not correct damaged files. I use rsync to backup data and restore just that data to the new/repaired system.
would I be able to just delete my entire root and replace it with the rsync backup without a problem?
Seems definitive enough.
Short answer - yep, looks like it should work. Might toss up a few curly issues (PID files, boot loader) but seems reasonable. Not much different to taking a snapshot and rolling back - just a lot more effort ...
(well not quite the same - rsync only does disk-resident files. It has no knowledge of what's cached in memory).
Last edited by syg00; 05-25-2015 at 09:20 PM.
Reason: last comment
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.