1

I know there are a few sync tools available in linux (I use openSuse OS btw), but I think they all do a pure "sync" and I am looking more for a backup function which is not synced (I could be mistaken).

My computer hard disk is not so big, so ideally, I will put a file on my computer, sync, and be able to delete it on pc, while it stays on the hard disk.

Is this at all possible in an automated way? It would make life so much easier...

2 Answers 2

2

This is actually the default behaviour of rsync. In one of its simpliest use, you can run:

rsync -av /path/to/files/ /backup/ 

If one file has been removed from /path/to/files/, it will still be in /backup.

If you want to change this behaviour (ie: remove the file from the /backup directory when it doesn't exist anymore in /path/to/files/), then just append the --delete flag to rsync (this is not what you want).

# do some stuff in /path/to/file/test.txt and sync your backup rsync -av /path/to/files/ /backup/ # delete the original test.txt rm /path/to/file/test.txt # re-sync your backup rsync -av /path/to/files/ /backup/ # /backup/test.txt is still here 
1
  • i wrote my own script around rsync to 1: save originals of deleted and modified files archived with date and time of run, 2: make a path config file, 3: manage many backups setups ... each is a directory somewhere with the archived files, config, logs, list of files. and main backup tree. it does reverse-increment so you can trim off old archives as desired. have a peek (not documented, yet, such as the config file format, and still needs some of my custom stuff) ... s3.amazonaws.com/skaperen/run-backups Commented Apr 15, 2015 at 11:29
0

I have previously setup a dropbox configured not to download anything locally, and with rsync setup to run incrementally. Works well, but you lose the backup functionality sync services usually provide as you only have one copy in the cloud.

2
  • So I could use rsync to do something similar to my hard disk? Commented Apr 15, 2015 at 14:44
  • yes of course. See apaul's reply above and there are plenty of guides to follow if you need more detail. Like this one for example: howtogeek.com/135533/… Commented Apr 17, 2015 at 3:48

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.