Tell me more ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have a raspberry pi with a webserver and ftpserver running. (apache and proftpd) its just a little website, a playground.

I would like my files to be backed up every time I update/change them via FTP. So when I upload my new, changed, html-file, the old one should be copied over in another directory, possibly with date and time in the filename.

I would then set a maximum number of files in this directory, so it doesn't fill up my whole space.

Like I said, it doesn't have to be perfect, it's just a small playgroud where I'm testing some things, but I would still like to have at least some earlier versions of the files available.

Thanks

share|improve this question
I remember, there was something like callbacks for ProFTPd, that get called when a certain event occurs. – 23tux Mar 1 at 11:46
1  
Can't you use some version control system like git ? – Basile Starynkevitch Mar 1 at 12:03
   
I have no experience with git. Can I use that for my html files which I edit via FTP? – chris Mar 1 at 12:07
You can push files to git via ssh. Are you able to ssh to the system instead of FTP? – John Zwinck Mar 1 at 12:10
+ for git. Also you can upload html via rdiff-backup.nongnu.org or noah.org/wiki/Rsync_backup. While rsyncing, they will keep also previous versions of files. – jet Mar 1 at 18:32

migrated from stackoverflow.com Mar 1 at 12:50

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.