简体   繁体   English

Debian Jessie (proxmox) tar 备份

[英]Debian Jessie (proxmox) tar backup

I have four servers each with same hardware specification running proxmox 4 with same configuration.我有四台服务器,每台服务器都具有相同的硬件规格,以相同的配置运行 proxmox 4。 Yesterday I tried to do tar backup on each of them.昨天我试着对他们每个人做 tar 备份。 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.并将其保存为 fullserver.sh 放在主根树的备份目录中。

/mnt/backup1 is directory where second hard disk is mounted. /mnt/backup1 是挂载第二块硬盘的目录。

Example script is for the server number 1. And It's the same on all other except directory names.示例脚本用于服务器编号 1。除目录名称外,其他所有脚本都相同。

What happened is that created *.tar.gz file is different in size on each server, varying from 100 to 400 Mb.发生的情况是创建的 *.tar.gz 文件在每个服务器上的大小不同,从 100 到 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.最大的问题是最后一个,我做了所有相同的事情,输出文件的大小只有 1 Mb。

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!). df/du 命令将为您提供系统上繁忙目录的视图(但并非总是如此!)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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