-1

I have four servers each with same hardware specification running proxmox 4 with same configuration. Yesterday I tried to do tar backup on each of them. I created simple script:

tar -zcvpf /mnt/backup1/root_backup/root_backup_1.tar.gz --directory=/ --exclude=mnt/backup1/root_backup .

and save it as fullserver.sh placed in backup directory on main root tree.

/mnt/backup1 is directory where second hard disk is mounted.

Example script is for the server number 1. And It's the same on all other except directory names.

What happened is that created *.tar.gz file is different in size on each server, varying from 100 to 400 Mb. And biggest problem is with the last one, where I did everything the same and output file is only 1 Mb in size.

Do you see where I made a mistake?

Thanks in advance

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
urlator
  • 37
  • 5

1 Answers1

0

Try this:

cd / && tar czvfp /mnt/backup1/root_backup/root_backup_1.tar.gz --exclude=/dev/* --exclude=/proc/* --exclude=/sys/* --exclude=/tmp/* --exclude=/mnt/* --exclude=/lost+found .

and question: really your systems are the same? df/du commands will give you a view of the busy directory on your system (but not always!).

gruntboy
  • 166
  • 2
  • thanks man, I just tried your suggestion. it seemed to work, but finished with 'tar: Exiting with failure status due to previous errors'. have any ideas what that could be? and I checked df and they are the same. I have only installed proxmox and parted on each of them. – urlator Oct 19 '16 at 09:51
  • [1] tar -czvfp [...] or [2] set your output file for root_backup_1.tgz or [3] check capacity of /mnt/backup1 (if there is a missing space) and the answer that helped. – gruntboy Oct 19 '16 at 10:23
  • tried that, as well as excluding run directory, but always with the same result. I'll continue and see what happens. – urlator Oct 19 '16 at 12:00