making a full backup
guys, I'm using this tar command in order to make a full backu, but for some reason is not completing... "it hangs"
Code:
tar -zcvpf /mnt/backup/fullbackup.tar.gz / --exclude=mnt/backup > /home/user/backup.log |
Don't backup /proc, /tmp, /sys, /var/tmp, /mnt, /dev or /media. /proc and /sys files are generated on the fly by the kernel. The /dev directory is created when you boot, and changes are made by udev as you run. /tmp is not important and often cleared when you reboot. /mnt contains filesystems you mount, often large external drives. /media is for removable media that is auto mounted.
(directories under /mnt you might want to backup, but on a case by case basis, as in an internal hard drive mounted there) Be sure to scan through the tar info manual. Do you use file attributes that tar doesn't backup? It may depend on your version of tar, and which attributes you need backed up. E.G. se-linux or posix capabilities. Read the section on dumps. The -g option may be useful for producing incremental backups. I'm betting that the hangup is due to trying to backup /proc, which will generate a core image of your entire system. You may have a have circular link somewhere. |
Are you also backing up the other files and folders in /mnt? if not exclude the whole directory.
tar -zcvpf /mnt/backup/fullbackup.tar.gz --exclude=/proc --exclude=/lost+found --exclude=/mnt --exclude=/sys / > /home/user/backup.log Try that, also, what does the backup.log file stop at? |
Quote:
|
To check if it really has stopped you can check the size of the backup file by doing this:
Code:
watch ls -l /mnt/backup/fullbackup.tar.gz If that is the case see what happens by excluding the /srv folder Code:
tar -zcvpf /mnt/backup/fullbackup.tar.gz --exclude=/srv --exclude=/proc --exclude=/lost+found --exclude=/mnt --exclude=/sys / > /home/user/backup.log |
nahh, I gave up on tar. I started using dump which gets the backup done pretty fast. I'm talking about 7 Gigs of space down to 1.5 Gig in about 20 min...
|
Quote:
|
full backup with dump
dump -0aj -f /mnt/storage/backup/home.bak /home/user here's a good link to get your feet wet with dump.... I'm still getting to know the command, but I think one of the best functionality is the built in options of making full, incremental, and differential backups http://surf.ap.seikei.ac.jp/~nakano/...-HOWTO.en.html |
thanks it works perfectly!
|
All times are GMT -5. The time now is 02:38 PM. |