Skip to content

Instantly share code, notes, and snippets.

@TacoSteemers
TacoSteemers / gist:6405772
Last active December 22, 2015 02:49
rsync: My preferred rsync backup command -a : Recursive, including owner and group, permissions (a for archive) --delete : Remove everything that exists on the target, but does not exist on the original -v, --progress, --stats : This will keep you up to date on the progress -h : Filesize will be shown in human-friendly format
rsync -avh --delete --stats --progress /media/original/ /media/target
@TacoSteemers
TacoSteemers / gist:6797573
Created October 2, 2013 17:46
Recursive chown/chmod
Don't forget to use the correct user:group and permissions.
find . -print0 | xargs --null chown server:server
chmod for directories:
find . -type d -print0 | xargs --null chmod -R 755
chmod for files:
find . -type f -print0 | xargs --null chmod -R 755
@TacoSteemers
TacoSteemers / gist:7515911
Created November 17, 2013 17:39
'return' is not allowed in object initializer
Getting "Groovyc: 'return' is not allowed in object initializer"?
You forgot a pair of parenthesis.
The following code
public List getImportedClasses
{
return imports
}
is not valid in Groovy or Java. Add the pair of parenthesis:
@TacoSteemers
TacoSteemers / gist:11060507
Last active August 29, 2015 14:00
backuppc installation
In my setup, /var/lib/backuppc is a soft link to a directory on a different filesystem, lets say /backup
Problem one: could not start the service
Solved by setting
chmod g+s /backup
chown -R backuppc /backup
Problem two: web interface would not come up
Solved by running (as root):