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.
How do I create an incremental backup of my windows server?
Currently running the following script for a full back up of our Windows file server. Looking over available documentation I having a hard time wrapping my head around how to accomplish my desired task using linux and/or rsync specifically.
Being more familiar with Windows ROBOCOPY we would us the "-m" switch to copy and clear the file's "archive" attribute. What would be the superior Linux resolution?
I am not exactly sure what you mean by day of week folder, but there is a very neat tool called storeBackup.
It allows you to create incremental backups, the frequency of which can be freely configured. So if you ran the script daily, you could configure storebackup to keep one backup for each of the last seven days, then one that is no older than two weeks, another one that is no older than two months, then 6 months, one year etc... You get the picture.
The cool part is that it is using hard links to duplicate files that have not changed between different backups. That means, that if you did not change anything between today's and yesterday's backup, the two backups will not consume more hard disk space than just one. However, each of them are independent, so you can delete either one and the remaining one is still intact.
Have a look at the project homepage for more info, but store backup is also included in many distro's repos.
I am not exactly sure what you mean by day of week folder, but there is a very neat tool called storeBackup.
It allows you to create incremental backups, the frequency of which can be freely configured. So if you ran the script daily, you could configure storebackup to keep one backup for each of the last seven days, then one that is no older than two weeks, another one that is no older than two months, then 6 months, one year etc... You get the picture.
The cool part is that it is using hard links to duplicate files that have not changed between different backups. That means, that if you did not change anything between today's and yesterday's backup, the two backups will not consume more hard disk space than just one. However, each of them are independent, so you can delete either one and the remaining one is still intact.
Have a look at the project homepage for more info, but store backup is also included in many distro's repos.
That's what duplicity with Deja Dup does. Welcome to the conversation.
Not trying to turn this into a "my tool is better" thread, at the end I think it's good to suggest several options to answer a question so the OP is aware of the options.
That said, the fact there is a "storeBackupRecover" does not mean that you actually need it.
I've been using storebackup for years now, and simplicity is my highest priority in the choice of backup tools. Storebackup creates normal directories, and optionally compresses the contents (using standard utilities). storeBackupRecover might provide additional features / convenience in some circumstances, but is not needed anymore than if you had created the backup with rsync. In fact I've never used it so I can't tell exactly what you'd need it for.
I have not used duplicity, so I cannot speak to it, but if it creates a non-standard format that would be a show-stopper for me. The day I loose a file and want to recover it, I just want to open the backup directory and grab it there.
Thanks everyone for your post. Given that this is an exercise in developing a better understanding of Linux, suicidaleggroll your post is most appreciated. As time and needs develop will probably start looking into the more formal apps.
Thanks again.
Code:
symbackup="/path/to/backup_latest"
prevbackup=$(readlink "$symbackup")
currbackup="/path/to/backup_$(date +Ym%d_%H%M%S)"
rsync -aAXv --link-dest="$prevbackup" /* $currbackup/ --exclude={/dev/*,/proc/*,/sys/*,/tmp/*,/run/*,/mnt/*,/media/*,/var/run/*,/var/lock/*,/lost+found,/path/to/*}
if [[ $? -eq 0 ]]; then
rm -f "$symbackup"
ln -s "$currbackup" "$symbackup"
fi
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.