简体   繁体   中英

Debian Jessie (proxmox) tar backup

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

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!).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM