View previous topic :: View next topic |
Author |
Message |
LIsLinuxIsSogood Veteran
Joined: 13 Feb 2016 Posts: 1186
|
Posted: Mon Oct 01, 2018 9:11 pm Post subject: Backing up the system with a script or tool |
|
|
Can someone please help to share a backup script. I have been having issue with understanding the difference in Partition style backups like I have done for many years with fsarchiver - I like the tool in terms of ease of use it works basically 100% of the time but this doesn't present much flexibility for the way of doing a backup, i.e. I need to usually shut down the system and reboot in order to back up the root filesystem. Is that expected?
What other tools are there that could be backing up the '/' directory without having to restart the machine.
Also what is the primary tool used for good system backups - is it tar? Can I perform tar on a mounted and running partition and ensure that the backup is not corrupt in that sense as well...I want to avoid rsnapshot and rsync since I feel these tools are perhaps better for other purposes such as creating local copies or else backing up just portions of the file system such as My Docs. |
|
Back to top |
|
|
grgdvo n00b
Joined: 21 May 2017 Posts: 15
|
Posted: Mon Oct 01, 2018 9:26 pm Post subject: |
|
|
See LVM snapshots, for example (if i not mistake in ZFS there are some methods doing online snapshots).
Other methods (including simple dd) are errorprones, i.e. you will probably get inconsistent disk or partition image. |
|
Back to top |
|
|
LIsLinuxIsSogood Veteran
Joined: 13 Feb 2016 Posts: 1186
|
Posted: Mon Oct 01, 2018 11:49 pm Post subject: |
|
|
Well since these are already partitioned using different format (ext4) so my system is not set up to do be managed the way volumes on ZFS is.
I suppose the idea of LVM would be valuable though since taking a snapshot is sort of the point (in order to then create the backup from that temporary snapshot that will become permanent backup). And then delete the temporary snapshot...that would work. Does anyone know of another way around this problem with ext4 linux filesystem?
Here are my own ideas:
1) The fsarchiver tool has a flag for taking a live backup, so that seems to work but the program itself has some serious limitations, in terms of what can be included/excluded and the metadata that is stored with the backup.
2) Are there other live backup tools that people have used that would perform some of the tricky routines involving unmounting and remounting the filesystem 'ro' so that it can be copied or archived without these kind of issues....
tar: /__/___._: file changed as we read it
By the way what does this mean when tar discovers a changed file does it write the new or the old file to the archive??? |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54793 Location: 56N 3W
|
Posted: Tue Oct 02, 2018 9:05 am Post subject: |
|
|
LIsLinuxIsSogood,
With any filesystem mounted rw and in use, there will be files open for writing and the filesystem will be marked 'dirty', so there is not really a way around it.
You need that snapshot, however its produced.
How do you know how many time a file changed while tar is reading it?
I suspect the answer is neither, it just makes a mess. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
|