LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   system backup from running system (https://www.linuxquestions.org/questions/linux-server-73/system-backup-from-running-system-685712/)

gernonimo 11-24-2008 06:02 AM

system backup from running system
 
Is it possible to make a backup of the whole system from a running system?
Now i use a Live-CD to backup (and restore if necessary) my system. But this causes downtime of my server so i'm searching for an alternative backup solution without having to shut down my server.

thank you!

Bdfy 11-24-2008 07:41 AM

cp -ax, rsync ( except /dev ( if your use udev ), /proc, /sys ) :). For database - use internal dump utils - for example for PostgreSQL - pg_dump.
But for rpm/deb based distr - sufficiently list of packages.

djsoundfx 11-24-2008 12:01 PM

What level of backup are you looking for? rsync ( http://www.samba.org/rsync ) is a great free tool to back up just about anything but it takes a little finess to get it setup just right. Rsync is one of my favorite solutions for things like web servers where you just wanna back up html, conf, txt, etc. and then only back the up again when the files have and you're not really worried about the binaries.

There are also a lot of great open source solutions that resemble of an enterprise backup solution. For example, I like Amanda its easy to use and has great documentation. These are good for full os level backups or database exports. Check it out at http://amanda.zmanda.com/

Alternatively you can do full image backups with something like Clonezilla ( http://clonezilla.org )or Acronis (a paid solution). Clonezilla is great but its cold cloning (meaning there will be downtime just like when you use your live cd).

Depending on what the system is most often I use just an rsync back up and move it to a redundant system so in the event my main server goes offline the back up server can be online in a matter of minutes. I do however take OS level backups (usually images with Clonezilla) before and after patching systems.

Hope that helps! There's also a ton of information on LQ and google that address back ups and best practices depending on your specific environment and system purpose.

trickykid 11-24-2008 01:33 PM

Open Source Backup Solutions: http://en.wikipedia.org/wiki/List_of...re#Open_source

Proprietary Backup Solutions: http://en.wikipedia.org/wiki/List_of...re#Proprietary

gernonimo 11-24-2008 03:40 PM

thanks for your responses - i'll take a look at the backup tools you recommended.

I do make backups with rsync of my data and i thougt of using it for my system. But is it safe to make system backups with rsyc of a running system? I think, under some circumstances, there could be problems with changing files during the backup. For example: what's happening with a big file that's changing continously (for example if you record a stream?) - can the file get damaged? I think the same could apply for databases which can get inconsitent. Is this true?
Probably also lock-files can be problematic.
I want to make backups of my system before i install/upgrade software on my server without having downtime every week or so. So if i trash the system i want to be able to restore the latest working version and i want to be sure that my backup is not corrupted because of the above described problems.

djsoundfx 11-26-2008 12:59 PM

Quote:

Originally Posted by gernonimo (Post 3353163)
thanks for your responses - i'll take a look at the backup tools you recommended.

I do make backups with rsync of my data and i thougt of using it for my system. But is it safe to make system backups with rsyc of a running system? I think, under some circumstances, there could be problems with changing files during the backup. For example: what's happening with a big file that's changing continously (for example if you record a stream?) - can the file get damaged? I think the same could apply for databases which can get inconsitent. Is this true? Probably also lock-files can be problematic.

It depends on the levels of backup you're taking. Usually you don't do a full system dump/image every night. Usually you do something like dump the databases to a file then move those files to a safe location. Same thing with the stream, if you're backing up you wanna limit the amount of processes actively running.

Proprietary backup solutions can handle this for you, if you do rsync you'll wanna write a script (or scripts) that shuts a daemon down, backups the file(s) and then restarts the daemon. Usually you don't rsync everything all your system every night/week. Usually you just wanna focus on the things that you can't live with out... configuration files, photos, videos, whatever is important to you. You can always rebuild your OS and daemons, but it'd go a lot faster with those configurations you backed up!

Quote:

I want to make backups of my system before i install/upgrade software on my server without having downtime every week or so. So if i trash the system i want to be able to restore the latest working version and i want to be sure that my backup is not corrupted because of the above described problems.
What software are you upgrading on a weekly basis that needs a full file system level backups? Usually backing up the configuration files for a daemon (like say apache) is sufficient. So you backup the config files, apply the update, and if Apache is now broken, you downgrade to the previous version and restore your configuration files.


All times are GMT -5. The time now is 07:37 AM.