Page 1 of 1

How to use rsync to backup a server?

Posted: Fri Jul 08, 2022 7:17 am
by Grogster

Hello everyone. :)

In yet another thing I am trying to do, as I am having quite good success with all my previous Puppy problems with the help of everyone here, I am about to rebuild my media backup server.

I have one server(currently running Bionic64) that is basically a huge media NAS for a Raspberry Pi mediaplayer frontend running OpenELEC 7.
I know there are newer versions of OpenElec, but v7 does everything I ask of it, so I am still using it.

Anyway, what I would quite like to do, is once I have my main server box setup and up to date, I would like to use something like Rsync to make a backup to the other server box. Both server boxes will end up running FriendlyBionic32 with VNC, so I can remote-desktop into them both if I need to.
Both will be using SAMBA Simple Management to share files - but the backup box might not need that?
Both boxes will have four 4TB Western Digital Red NAS hard-drives in them, so there will be no size difference.

At the moment, I have to remember to manually backup media on the main server, to the backup server and that gets tedious real fast as I often forget, then have a whole heap of things to backup - but I can't remember what was done last, and it just takes so much time to sort out. :cry:

Basically, I want to be able to have Puppy run Rsync or similar on the main server, to backup everything that is in "SERVER1" to "SERVER2" for example.
Ideally, I would be able to specify a time to do this - such as 3AM each day kind of thing, and they can just sync themselves while I am asleep. ;)

Do any of the members here have experience with using Rsync?
Does there perhaps exist a GUI app for Rsync allowing for easy setting of all the options and it just runs in the background on SERVER1, syncing to SERVER2?

Thanks for any replies.


Re: Rsync help for Puppy....

Posted: Fri Jul 08, 2022 1:57 pm
by rockedge

@Grogster You should see if @wiak can give a simple example of an rsync script/line that has been experimented with during WeeDogLinux and KLV development. It's not a 100% solution but could get you started.


Re: Rsync help for Puppy....

Posted: Fri Jul 08, 2022 1:58 pm
by tosim

Take a look at "grsync" for gui.


Re: How to use rsync to backup a server?

Posted: Sat Jul 09, 2022 1:02 am
by Flash

Copy fast might be useful. It's a front end for rsync.

copy-fast-2.7.pet
(12.6 KiB) Downloaded 70 times

Right-click on the file or directory you want to copy and choose Copy to. The rest should be obvious.


Re: How to use rsync to backup a server?

Posted: Sat Jul 09, 2022 3:51 am
by Grogster

Thanks for the replies.

Copy-Fast sounds interesting, so I will definitely check that out.


Re: How to use rsync to backup a server?

Posted: Sat Jul 09, 2022 4:32 am
by Tenoch

I believe you need a simple script that executes rsync, then create a cronjob to automate it at certain time and day.


Re: How to use rsync to backup a server?

Posted: Sat Jul 09, 2022 10:47 am
by dancytron

Here's a link to a prior post of mine with the script I use.

https://forum.puppylinux.com/viewtopic.php?p=4531#p4531

Here are the links I have in my notes.

https://wiki.archlinux.org/index.php/Rs ... up_utility

https://askubuntu.com/questions/98597/i ... nc-process (for logging and verbose options)


Re: How to use rsync to backup a server?

Posted: Sat Jul 09, 2022 7:36 pm
by williams2

My script to remaster adrv_bionicpup64_8.0.sfs has this line:

rsync -av /initrd/pup_a/ /tmp/a1

which automatically creates the dir /tmp/a1/ if necessary
and copies all the files in /initrd/pup_a/ to /tmp/a1/
(so /tmp/a1/ is the file system in adrv_bionicpup64_8.0.sfs unsquashed and rw)

The next line is rsync -av --exclude=.wh.* /initrd/pup_rw/ /tmp/a1
which writes over the files and dirs in /tmp/a1/

-a is archive mode (copies everything including date stamps etc)
-v is verbose (prints the name of each file as it is copied)
(-v is optional.)

Like this:

Code: Select all

# rsync -av /initrd/pup_a/ /tmp/a1

sent 260,097,912 bytes  received 52,104 bytes  24,776,192.00 bytes/sec
total size is 259,852,427  speedup is 1.00
# rsync -av /initrd/pup_a/ /tmp/a1
sending incremental file list

sent 87,776 bytes  received 699 bytes  176,950.00 bytes/sec
total size is 259,852,427  speedup is 2,937.02
#

The first time, it copied all 260 MB from /initrd/pup_a/ to /tmp/a1/
The second time, it did not copy any files (pup_a is read only)