开发者

How to backup source repository and zip destination folders?

开发者 https://www.devze.com 2023-01-21 21:09 出处:网络
All sources are on windows OS, and destination backup is on Unix system (we are using Samba). My source repository is similar to :

All sources are on windows OS, and destination backup is on Unix system (we are using Samba).

My source repository is similar to :

-Repository
--Folder1
---Files
--Folder2
---Files
etc...

I would like to get a destination similar to :

-Repository
--Folder1.zip
--Folder2.zip
etc...

After first backup, I only backup files that have changed since the last backup. (or backup if new folders/files have been created).

Is someone know a too开发者_运维知识库l or a script for my backup needs? Can we do that with Robocopy?


You may install cygwin on your Windows machine, and use simple sh script, like the following one:

#!/bin/bash
for i in $( ls ); do
        tar czf $i.tar.gz $i
done

# specify your destination here:
rsync *.tar.gz /tmp
rm *.tar.gz

BTW, that's not the most straightforward way, I suppose.


If you are open to forget about the zipping part, I would advise backuppc on the Unix system and rsync (win32 port) / or samba config on the Windows system

see https://help.ubuntu.com/community/BackupPC and http://backuppc.sourceforge.net/ for more infos

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号