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

Re: Live Fille System Backup

On 5/4/17 7:17 PM, Sergei G wrote:
> I am running Raspberry PI and I would like to dump full file system without
> shutting down the system.  One machine runs nginx and another runs
> PostgreSQL.  I have had a good success with FreeBSD and dump software, because
> it is part of the OS and core team maintains it.  
> However, dump utility is no longer maintained by the original developer and is
> effectively getting too old.  I am no longer sure what is a dump-like solution
> that's easy to work with at a file system level.
> I would like a backup tool that does not bring a million dependencies with MBs
> of files.  Something that works on server without X Windows and can send
> backup to an externally attached USB drive.  Nothing fancy.   No network
> infrastructure.  Incremental backups would be greatly appreciated.  Ability to
> pipe to a compression program is a plus, just like I did with dump.
> I'd like to be able to apply a similar solution on actual Debian and Ubuntu
> VMs.  When I go to Ubuntu I might have to deal with newer ext file systems. 
> Not sure what is supported there.
> If there is no good live backup solution, I am willing to take the system down
> and back it up using another system.  It is not ideal, but it would work.
> Any advice would be greatly appreciated.
> P.S. All mentioned systems are Debian based and I feel that it is appropriate
> to ask on Debian user list.
> Thank you
I use rsnapshot to live backup my root partition (home is mounted on another
partition) to a directory under home.  rsnapshot uses rsync with the appropriate
options (I do add some extras) to do a backup.  I do this before I do an "apt
upgrade"  so that if things don't work well after the upgrade I can restore what
was there before.  I have used this "backup" several times to take my system
back to before the upgrade and have not had any problems.  I am not backing up
databases so those remarks here about that sort of backup apply.  To restore I
boot a copy of  SystemRescueCd, mount the source and destination partitions and
run a script that runs rsync with similar options to restore the root back to a
working state.  The rsnapshot backup is an exact copy (uncompressed) of the root
so you can go get a single file easily if you need to.

I also have several VM's of different Debian installs (unstable and testing)
that I upgrade every few days to follow any problems that arise but since the
VM's can't duplicate my main system's xorg setup they don't catch everything.  I
use rsnapshot on these VM's also and have restored the rsnapshot backup several
times.  I have tried btrfs on these vm's but I always ended up running out of
free space during an upgrade so I would have to delete some older snapshots to
free up some space and run the upgrade again.  These vm's are running on 20 to
30 GB virtual hard drives so there is not a lot of free space for the btrfs

Grub can also handle booting an iso of SystemRescueCd so I don't even have to
find a cd with SystemRescueCd on it.  Just select the grub menu option for

For a daily backup I use backuppc to backup all my local systems and a remote vm
at digital ocean.  These backups are all on live systems and would have the
problems with live databases as described by others.  You just need an ssh login
using rsa key pairs so you don't have to supply a password to backuppc. 
Postgresql has ways to backup databases and is made very easy by using a program
like "pgadmin III" (in Debian as pgadmin3/testing,unstable,now 1.22.2-1 amd64). 
You might have to stop database updates while you backup though.  Individual
tables or the whole database can be backuped.


Reply to: