Server Backup

Discussion in 'HOWTO-Related Questions' started by Quaxth, Jan 25, 2014.

  1. Quaxth

    Quaxth Member

    I was on the search for to get some Server Backup Apps to working and had some problems. From some bad experiences I was like to do an fully Server Backup, not an cloning, just all folders and files in case I face some errors again. On an Desktop I could just use some apps like WinRAR, WinZIP or so for to create an archive of all files compressed on an external HDD and similar it should work on Linux Server as well just using the already installed apps on the server.

    Easy to tell but easy to do without the required knowledge! So that mean I'd to sit down and read How To....! I'd know that TAR is part of Debian installation as well as some ZIP apps and that was my point to start. I also had to think about what I shouldn't backup because it's not need in backup and found that the folder PROC, SQUID and MNT are really not needed and that would save quite a bit of space if I do not backup those!

    Reading about TAR and what command's and parameters I've to use and started testing several commands on my old Test Server. After a bunch of try different commands I finally came to one which really worked did what I want:

    Code:
    tar -zcvpf /archive/full-backup-`date '+%d-%B-%Y'`.tar.gz \ --directory / --exclude=mnt --exclude=proc --exclude=var/spool/squid .
    zcvpf:
    • z = using zip/gzip for to compress
    • c = create an archive file
    • v = verbose for to display on screen what's being added to the archive file
    • p = preserve the permissions of the folders and files which would be added back while restoring
    • f = states 1. the location where the archive file will be stored and 2. what name is used for the archive file with the actual date of backup '+%d-%B-%Y'` and extension.

    Following is the command \ --directory /, in my case I created upfront an folder called archive on root of the server. After that the excluded folders are named and last, which is important the . (dot) which tells TAR to backup everything in the current folder.

    The time of doing the full backup was need a 2h 10min on an server with 4 core AMD CPU, 16 GB Memory and SATA 3 HDD.

    I used PuTTY and WinSCP for to do that work, PuTTY on the Server Terminal Screen and WinSCP for to copy the backup archive after creation to an external drive, but leave the original on server.

    This backup was done only for to have all files and folders available if I get again such problem that the server infos disappearing in ISPConfig as it were happen some day's ago! At that time I was need to do a complete new installation of the server OS, ISPConfig and all those apps I need to have running etc., etc.! The next step in my Backup Adventure will be for to test first on my test server an apps which I could use for to clone the Server HDD as 1 to 1. May I'll use Clonezilla, Acronis Backup and Recovery or Idera Backup Server or even some other apps.
    Following I'll start to do incremental backups of new and changed files. Not sure yet which Media I'll use: HDD, Tape or BD? I use BD on Windows Server already and 50GB per media is quite OK! And, if the BD will works on Debian Server well, may I'll go for this too!

    I wrote this post because I learned from my mistake and lazyness not to use an backup till now, even I had planned that fort to do the next 2-3 month, the time the server need to really productive! Although Other may could profit a bit from my experiences, special Newbies!
     
    Last edited: Jan 26, 2014
  2. biggdog

    biggdog Member

    Hey thanks for the information. I too have found it difficult to get some questions answered so I wanted to say thanks for taking the time to give an answer and an explanation.
     
  3. id10t

    id10t Member

    You'll probably also want to exclude your /archive directory as well :)


    That said, once I'm all configured I'll copy all the appropriate files from /etc. Only need to back that up when something changes.

    Data all lives in a different spot, so that gets a different backup cycle/process.
     

Share This Page